<div class="loan-person">
  <div class="search">
    <div class="input">
      授信企业：
      <input type="text" placeholder="请输入授信企业名称" ng-model="companyName">
    </div>
    <div class="input">
      申请贷款时间：
      <input type="text" placeholder="开始时间" wdate-picker max-date="{{creditApplyTimeEnd}}" ng-model="creditApplyTimeStart"> -
      <input type="text" placeholder="结束时间" class="no-ml" wdate-picker min-date="{{creditApplyTimeStart}}" ng-model="creditApplyTimeEnd">
    </div>
    <button class="btn-search font-white search-creatPe" ng-click="getCompanyClientList(1)">查询</button>
  </div>
  <div class="search-inp-ses">
    <button ng-class="{'btn-green font-white': state.selected, 'btn-white font-black': !state.selected}" ng-repeat="state in $CONST.LOAN_STATE" ng-bind="state.label" ng-click="switchState(state)"></button>
  </div>

  <table class="list-table text-c table table-striped">
    <thead class="bg-green font-white">
      <tr>
        <th>企业名称</th>
        <th>手机号码</th>
        <th>申请时间</th>
        <th>授信状态</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="item in creditList">
        <td ng-bind="item.company_name"></td>
        <td ng-bind="item.user_phone"></td>
        <td ng-bind="item.credit_apply_time"></td>
        <td ng-bind="$status.name(item.clerk_status, item.employee_status)"></td>
        <td class="font-yellow cursor">
          <span ng-click="toDetail(item, 1)" ng-if="$status.showAuditButton(item)">审核</span>
          <span ng-click="toDetail(item)" ng-if="$status.showDetailButton(item)">查看详情</span>
          <span ng-if="$status.showToastCustomer(item)">|</span>
          <span ng-click="popUpNotify(item)" ng-if="$status.showToastCustomer(item)">通知客户</span>
        </td>
      </tr>
      <!--如果没有数据-->
      <tr ng-show="!creditList || creditList.length == 0">
        <td colspan="5">暂无授信数据</td>
      </tr>
    </tbody>
  </table>
  <!--分页组件-->
  <app-page ng-if="totalPage > 1" current="currentPage" totals="totalPage" fn="changePage"></app-page>
  <!--弹出框-->
  <pop-up name="通知" show="show" list="list" button="['取消', '确定']" on="notifyClients()"></pop-up>
</div>
